<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	request.setCharacterEncoding("UTF-8");
%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 모바일 사용자를 위해 viewport 추가-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--모바일 기기에서 확대/축소 불가<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
콘텐츠 중앙으로 가져오기<div class="container">...</div>-->
<title></title>
<!-- jQeury -->
<script src="//code.jquery.com/jquery.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<!-- bootstrap -->
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/intranet/css/bootstrap.css">
<script
	src="${pageContext.request.contextPath }/intranet/js/bootstrap.js"></script>

<link rel="stylesheet"
	href="${pageContext.request.contextPath }/intranet/css/bootstrap-select.css" />
	<link rel="stylesheet"
	href="${pageContext.request.contextPath }/intranet/css/menutop.css" />
<script
	src="${pageContext.request.contextPath }/intranet/js/bootstrap-select.js"></script>
<script>
	//navbar-form navbar-right.action="";
</script>
</head>
<body>
	<%
		String id = (String) session.getAttribute("mid");
		String content = request.getParameter("inc_content");
		String name = (String) session.getAttribute("name");
		if (id == null || id.equals("")) {
	%>
	<script type="text/javascript">
		location.href = "${pageContext.request.contextPath }/intranet/login/login.jsp"
	</script>
	<%
		}
		String counsel = "";
		String approval = "";
		String product = "";
		String contract = "";
		String code = "";
		
		if (content != null && content != "") {
			if (content.equals("./counsel/counsel_list.jsp")) {
				counsel = "active";
			} else if (content.equals("./approval/ap_list.jsp")) {
				approval = "active";
			} else if (content.equals("./product/product_list.jsp")
					|| content.equals("./product/product_insert.jsp")) {
				product = "active";
			} else if (content.equals("./contract/contract_list.jsp")) {
				contract = "active";
			} else if (content.equals("./code/cd_list_crud.jsp")) {
				code = "active";
	}
		} else {
			counsel = "active";
		}
	%>
	<!-- 네비게이션바 영역 -->
	<nav class="navbar navbar-default bs-docs-nav" role="banner">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target=".navbar-ex1-collapse">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="#">CLAMP</a>
		</div>

		<!-- Collect the nav links, forms, and other content for toggling -->
		<!-- 상단 메뉴 링크 영역 -->
		<div class="collapse navbar-collapse navbar-ex1-collapse">
			<ul class="nav navbar-nav">
				<li class="<%=counsel%>"><a
					href="${pageContext.request.contextPath}/intranet/main/invalidate.jsp?url=${pageContext.request.contextPath}/Coun/CounList.clamp">상담</a></li>
				<li class="<%=contract%>"><a
					href="${pageContext.request.contextPath}/intranet/main/invalidate.jsp?url=${pageContext.request.contextPath}/Cont/ContList.clamp">계약</a></li>
				<li class="<%=approval%>"><a
					href="${pageContext.request.contextPath}/intranet/index.jsp?inc_content=./approval/ap_list.jsp">
						결재</a></li>
				<li class="<%=product%>"><a
					href="${pageContext.request.contextPath}/intranet/index.jsp?inc_content=./product/product_list.jsp">
						상품</a></li>
			
				<%-- <li><a href="${pageContext.request.contextPath}/intranet/index.jsp?inc_content=../homepage/salary/salary_list.jsp">사원관리</a></li> --%>
			    <%
					if ("1408M001".equals(id)) {
				%>
				<li class=<%=code%>><a
					href="${pageContext.request.contextPath}/intranet/index.jsp?inc_content=./code/cd_list_crud.jsp">코드관리</a></li>
				<%
					}
				%>
			</ul>
			<form class="navbar-form navbar-right" action='${pageContext.request.contextPath }/intranet/login/logout.jsp'>
				안녕하세요, <a href="#" class="navbar-link"><%=name%></a>님&nbsp;
				<button type="submit" class="btn btn-default">로그아웃</button>
			</form>
		</div>
		<!-- /.navbar-collapse -->
	</nav>
</body>
</html>